<?php

use Illuminate\Database\Seeder;

class MenuTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('menus')->insert([
        		//一级菜单
			['name' => '控制台','pid' => 0,'level' => 1,'icon' => 'fa fa-desktop','permission' => 'console','sort' => 900,'is_url' => 0,'is_show' => 1,],
			['name' => '用户管理','pid' => 0,'level' => 1,'icon' => 'fa fa-user','permission' => 'user','sort' => 800,'is_url' => 0,'is_show' => 1,],
			['name' => '菜单管理','pid' => 0,'level' => 1,'icon' => 'fa fa-list','permission' => 'menu','sort' => 700,'is_url' => 0,'is_show' => 1,],
			//二级菜单
			['name' => '清除缓存','pid' => 1,'level' => 2,'icon' => '','permission' => 'console.flushCache','sort' => 900,'is_url' => 1,'is_show' => 1,],
			['name' => '角色管理','pid' => 2,'level' => 2,'icon' => '','permission' => 'role.index','sort' => 900,'is_url' => 1,'is_show' => 1,],
			['name' => '账号管理','pid' => 2,'level' => 2,'icon' => '','permission' => 'user.index','sort' => 800,'is_url' => 1,'is_show' => 1,],
			['name' => '权限管理','pid' => 2,'level' => 2,'icon' => '','permission' => 'permission.index','sort' => 700,'is_url' => 1,'is_show' => 1,],
			['name' => '菜单编辑','pid' => 3,'level' => 2,'icon' => '','permission' => 'menu.index','sort' => 700,'is_url' => 1,'is_show' => 1,],
			//三级菜单
			//角色
			['name' => '角色列表查询','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.ajaxIndex','sort' => 900,'is_url' => 1,'is_show' => 0,],
			['name' => '显示角色','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.show','sort' => 800,'is_url' => 1,'is_show' => 0,],
			['name' => '新增角色','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.create','sort' => 700,'is_url' => 1,'is_show' => 0,],
			['name' => '提交新增角色','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.store','sort' => 600,'is_url' => 1,'is_show' => 0,],
			['name' => '编辑角色','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.edit','sort' => 500,'is_url' => 1,'is_show' => 0,],
			['name' => '提交编辑角色','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.update','sort' => 400,'is_url' => 1,'is_show' => 0,],
			['name' => '删除角色','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.destroy','sort' => 300,'is_url' => 1,'is_show' => 0,],
			['name' => '角色权限配对','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.auth','sort' => 200,'is_url' => 1,'is_show' => 0,],
			['name' => '提交角色权限配对','pid' => 5,'level' => 3,'icon' => '','permission' => 'role.authpost','sort' => 100,'is_url' => 1,'is_show' => 0,],
			//账号
			['name' => '账号列表查询','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.ajaxIndex','sort' => 900,'is_url' => 1,'is_show' => 0,],
			['name' => '显示账号','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.show','sort' => 800,'is_url' => 1,'is_show' => 0,],
			['name' => '新增账号','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.create','sort' => 700,'is_url' => 1,'is_show' => 0,],
			['name' => '提交新增账号','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.store','sort' => 600,'is_url' => 1,'is_show' => 0,],
			['name' => '编辑账号','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.edit','sort' => 500,'is_url' => 1,'is_show' => 0,],
			['name' => '提交编辑账号','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.update','sort' => 400,'is_url' => 1,'is_show' => 0,],
			['name' => '删除账号','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.destroy','sort' => 300,'is_url' => 1,'is_show' => 0,],
			['name' => '重置密码','pid' => 6,'level' => 3,'icon' => '','permission' => 'user.resetPsd','sort' => 200,'is_url' => 1,'is_show' => 0,],
			//权限
			['name' => '权限列表查询','pid' => 7,'level' => 3,'icon' => '','permission' => 'permission.ajaxIndex','sort' => 900,'is_url' => 1,'is_show' => 0,],
			['name' => '显示权限','pid' => 7,'level' => 3,'icon' => '','permission' => 'permission.show','sort' => 800,'is_url' => 1,'is_show' => 0,],
			['name' => '新增权限','pid' => 7,'level' => 3,'icon' => '','permission' => 'permission.create','sort' => 700,'is_url' => 1,'is_show' => 0,],
			['name' => '提交新增权限','pid' => 7,'level' => 3,'icon' => '','permission' => 'permission.store','sort' => 600,'is_url' => 1,'is_show' => 0,],
			['name' => '编辑权限','pid' => 7,'level' => 3,'icon' => '','permission' => 'permission.edit','sort' => 500,'is_url' => 1,'is_show' => 0,],
			['name' => '提交编辑权限','pid' => 7,'level' => 3,'icon' => '','permission' => 'permission.update','sort' => 400,'is_url' => 1,'is_show' => 0,],
			['name' => '删除权限','pid' => 7,'level' => 3,'icon' => '','permission' => 'permission.destroy','sort' => 300,'is_url' => 1,'is_show' => 0,],
			//菜单权限只留给管理员吧
			
			//后续功能菜单33
			['name' => '微信管理','pid' => 0,'level' => 1,'icon' => 'fa fa-wechat','permission' => 'wall','sort' => 600,'is_url' => 0,'is_show' => 1,],
			['name' => '欢迎词','pid' => 33,'level' => 2,'icon' => '','permission' => 'welcome.index','sort' => 900,'is_url' => 1,'is_show' => 1,],
			['name' => '微信菜单','pid' => 33,'level' => 2,'icon' => '','permission' => 'wechatmenu.index','sort' => 800,'is_url' => 1,'is_show' => 1,],
			['name' => '用户管理','pid' => 33,'level' => 2,'icon' => '','permission' => 'wechatuser.index','sort' => 700,'is_url' => 1,'is_show' => 1,],
			['name' => '微信墙','pid' => 33,'level' => 2,'icon' => '','permission' => 'wall.index','sort' => 600,'is_url' => 1,'is_show' => 1,],
        ]);
    }
}
